package com.appbee.news.server;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.validation.constraints.Size;

import com.appbee.core.server.dao.access.DeleteAccess;
import com.appbee.core.server.dao.access.InsertAccess;
import com.appbee.core.server.dao.access.ReadAccess;
import com.appbee.core.server.dao.access.UpdateAccess;
import com.appbee.core.server.model.EditEntity;
import com.google.appengine.api.datastore.Text;
import com.google.code.twig.annotation.Type;

@Entity
@ReadAccess
@UpdateAccess(roles = { "editor", "admin" })
@InsertAccess(roles = { "editor", "admin" })
@DeleteAccess(roles = "admin")
public class News extends EditEntity
{
	
	@Basic
	@Size(max=30)
	private String title;
	
	@Basic
	@Type(Text.class)
	private String content;
	
	public String getTitle()
	{
		return title;
	}

	public void setTitle(String title)
	{
		this.title = title;
	}

	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}
	

		

}
